package com.jiandan.meizi;

import com.jiandan.utils.DensityUtil;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * 入口页
 * 
 * @author Mr.He
 * 
 */
public class MainActivity extends Activity implements OnClickListener {

    private Button meizi;
    private Button renewal;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        meizi = (Button) findViewById(R.id.meizi);
        renewal = (Button) findViewById(R.id.renewal);
        meizi.setOnClickListener(this);
        renewal.setOnClickListener(this);
        
        DensityUtil.getDiviceWidth(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()) {

            case R.id.meizi:
                Intent meiziIntent = new Intent(this, MeiZiActivity.class);
                startActivity(meiziIntent);
                break;

            case R.id.renewal:
                Intent renewalIntent = new Intent(this, JanDanNewActivity.class);
                startActivity(renewalIntent);
                break;

            default:
                break;
        }

    }



}
